%fieldset#default-branch-settings
  - if @project.empty_repo?
    .text-secondary
      = s_('ProjectSettings|A default branch cannot be chosen for an empty project.')
  - else
    .form-group
      = f.label :default_branch, _("Default branch"), class: 'label-bold'
      %p= s_('ProjectSettings|All merge requests and commits are made against this branch unless you specify a different one.')
      .js-select-default-branch{ data: { default_branch: @project.default_branch, project_id: @project.id } }

  .form-group
    - help_text = _("When merge requests and commits in the default branch close, any issues they reference also close.")
    - help_icon = link_to sprite_icon('question-o'), help_page_path('user/project/issues/managing_issues.md', anchor: 'closing-issues-automatically'), target: '_blank', rel: 'noopener noreferrer'
    = f.gitlab_ui_checkbox_component :autoclose_referenced_issues,
        s_('ProjectSettings|Auto-close referenced issues on default branch'),
        help_text: (help_text + "&nbsp;" + help_icon).html_safe
